Github, GitLab, and BitBucket are all similar and they provide hosting services, which is basically a home for your project on the internet.
It’s like having a DropBox or GoogleDrive but for git-based projects.
This allows other people to see your stuff, synchronize it, and contribute.
An intro on this can be found here
The repository contains: the files, the modifications and the description of these changes. Others can download and synchronize these files with their changes (‘clone’)
Important: What NOT to track: just because you can version control something, doesn’t mean that you should. Best to reserve Git for plain text-based documents. Git stores the original file first, and then takes up very little space by only tracking the differences between versions. Things not to version control are large data files that never change (like excel and word) and output of the code. If code is fully reproducible, you shouldn’t need to store the output.
1.a. better ‘storage’ for long term - zenodo or the like
Project continuity. So many researchers hold limited-term appointments. Keeping docs on personal computers only does’t work for file transfer when people move on. Easier code and data handover
Project management. Highly collaborative research. Github Issues for discrete taks and sub-tasks: identify, assign, categorize, keep track/history. Github Discussions: message board for conversation Github Projects: real0time tracking of project priorities and status
Example of paper with good tracking of issues and discussions: https://github.com/fmsabatini/sPlotOpen_Manuscript
For the R user, best simple straightforward resource out there is Happy git with R
Github itself has a dedicated section for learning in the docs and in particular, the Hello World tutorial will get you creating a repo, managing a branch and merging a pull request.
Also known as a feature branch workflow
source https://www.nobledesktop.com/learn/git/git-branches